﻿using System.Collections.Generic;
using System.Linq;
using System;
using Microsoft.Win32;
using System.Text;

namespace AppTrans
{
    public static class RegistryKeyValues
    {
        public static void SetValue(string key, object value)
        {
            using (RegistryKey currRegistryKey = Registry.CurrentUser.CreateSubKey("Software\\AppTrans"))
            {
                if (currRegistryKey != null)
                {
                    currRegistryKey.SetValue(key, value);
                    currRegistryKey.Close();
                }
            }
        }

        public static object GetValue(string key)
        {
            object val = null;

            using (RegistryKey currRegistryKey = Registry.CurrentUser.CreateSubKey("Software\\AppTrans"))
            {
                if (currRegistryKey != null)
                {
                    val = currRegistryKey.GetValue(key);
                    currRegistryKey.Close();
                }
            }

            return val;
        }
    }
}
